home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2006 May
/
PCWMAY06.iso
/
Software
/
Resources
/
PaperCut Quota 6.1
/
pc-setup.exe
/
{app}
/
WebAdmin
/
Log.asp
< prev
next >
Wrap
Text File
|
2005-07-05
|
4KB
|
98 lines
<%@ Language=VBScript %>
<%' (c) Copyright 1999-2004 PaperCut Software Pty. Ltd. %>
<!-- #INCLUDE FILE="includes/PCCommon.inc" -->
<%
Dim intMAX_COUNT
intMAX_COUNT = 100
%>
<!-- #INCLUDE FILE="includes/header.inc" -->
<%
Dim objPCWebLog
Set objPCWebLog = CreateObject("PCWebAdmin.PCWebLog")
If objPCWebLog.Error Then
WriteErrorMessage objPCWebLog.ErrorDescription
End If
Dim strUserName
strUserName = Trim(Request("strUserName"))
If Not gblnIsAdmin or Request("strMyLogs") <> "" Then
strUserName = gstrLoggedInUser
End If
If strUserName <> "" Then
objPCWebLog.RestrictedOnUser(Trim(strUserName))
Response.Write "<H1>" & GetTextReplace("RecentPrintLogsBy", Array(strUserName)) & "</H1>"
WriteUserAdminLinks(strUserName)
Call DisplayList(False)
WriteUserAdminLinks(strUserName)
Else
'objPCWebLog.FullLog ' Defaults to this anyway
Response.Write "<H1>" & GetText("RecentPrintJobs") & "</H1>"
Call DisplayList(True)
End If
Set objPCWebLog = Nothing
Sub DisplayList(blnShowUser)
Response.Write "<CENTER>" & vbCRLF
Response.Write "<TABLE class=""webAdmin"" width=""95%"" >" & vbCRLF
Response.Write "<TR>" & vbCRLF
Response.Write "<TH width=""14%"">" & GetText("Time") & "</TH>" & vbCRLF
If blnShowUser Then
Response.Write "<TH width=""6%"">" & GetText("User") & "</TH>" & vbCRLF
End If
Response.Write "<TH width=""14%"">" & GetText("Printer") & "</TH>" & vbCRLF
Response.Write "<TH width=""19%"">" & GetText("Document") & "</TH>" & vbCRLF
Response.Write "<TH width=""5%"">" & GetText("Pages") & "</TH>" & vbCRLF
Response.Write "<TH width=""9%"">" & GetText("Cost") & "</TH>" & vbCRLF
Response.Write "<TH width=""9%"">" & GetText("Status") & "</TH>" & vbCRLF
If gblnHasChargeBack Then
Response.Write "<TH width=""14%"">" & GetText("Account") & "</TH>" & vbCRLF
End If
Response.Write "</TR>" & vbCRLF
objPCWebLog.MoveFirst
Dim intCount
intCount = 0
do while ((not objPCWebLog.EOF) and intCount < intMAX_COUNT)
Response.Write "<TR class=""" & RowClassHelper(intCount) & """>" & vbCRLF
Response.Write "<TD nowrap align=left>" & objPCWebLog.Time & "</TD>" & vbCRLF
If blnShowUser Then
Response.Write "<TD nowrap align=left><a title=""" & GetTextReplace("ViewUserLogs", Array(objPCWebLog.UserName)) & """ href=""Log.asp?strUserName=" & Server.URLEncode(objPCWebLog.UserName) & """>" & objPCWebLog.UserName & "</A></TD>" & vbCRLF
End If
Response.Write "<TD align=left>" & objPCWebLog.PrinterName & "</TD>" & vbCRLF
Response.Write "<TD align=left>" & objPCWebLog.DocumentName & "</TD>" & vbCRLF
Response.Write "<TD align=right>" & FormatNumber(objPCWebLog.Pages, 0, true, false, true) & "</TD>" & vbCRLF
Response.Write "<TD align=center>" & objPCWebLog.CostText & "</TD>" & vbCRLF
'Response.Write "<TD align=center>" & objPCWebLog.Status & "</TD>" & vbCRLF
Response.Write "<TD align=center>"
DisplayPrintJobStatus objPCWebLog.Status, objPCWebLog.UserName, objPCWebLog.Cost, objPCWebLog.LogEntryID, objPCWebLog.Refunded, objPCWebLog.Cancelled, objPCWebLog.Denied
Response.Write "</TD>" & vbCRLF
If gblnHasChargeBack Then
Response.Write "<TD align=center>" & objPCWebLog.Account & "</TD>" & vbCRLF
End If
Response.Write "</TR>" & vbCRLF
objPCWebLog.MoveNext
intCount = intCount + 1
loop
Response.Write "</TABLE>" & vbCRLF
Response.Write "</CENTER>" & vbCRLF
End Sub
%>
</CENTER>
<!-- #INCLUDE FILE="includes/footer.inc" -->